﻿using Medianamik.Core.Interfaces;

namespace Medianamik.Core.Action
{
    public class ActionEventArgs<T>
    {
        public ActionEventArgs(T pItem)
        {
            Item = pItem;
        }

        public T Item { get; private set; }
    }

    public class NodePropertyActionEventArgs : ActionEventArgs<NodeProperty>
    {
        public object OldValue { get; private set; }
        public object NewValue { get; private set; }
        
        public NodePropertyActionEventArgs(NodeProperty pProp, object pOldValue, object pNewValue/*, CultureInfo pCulture*/)
            : base(pProp)
        {
            OldValue = pOldValue;
            NewValue = pNewValue;
        }
    }

    public class NodeMovedEventArgs : ActionEventArgs<INode>
    {
        public short OldPosition { get; set; }
        public short NewPosition { get; set; }

        public NodeMovedEventArgs(INode pNode, short pOldPosition, short pNewPosition)
            : base(pNode)
        {
            OldPosition = pOldPosition;
            NewPosition = pNewPosition;
        }
    }
}